﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Create.aspx.cs" Inherits="APMS.WebSite.Views.User.Create" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">

    <script type="text/javascript" language="javascript" src="../../Content/Scripts/jquery-1.2.6.min.js"></script>
    
    <%-- Main Script for this View--%>
    <script type="text/javascript" language="javascript">
        $(document).ready(function(){
            
        });
    </script>

    <%-- TODO: Create master page for this kind of pages --%>
    <style media="screen" type="text/css">
        body
        {
            background-color: #005187;
            color: #000000;
            font-family: "Lucida Grande" ,Verdana, "Bitstream Vera Sans" ,Arial,sans-serif;
            font-size: 12px;
            line-height: 18px;
        }
        #errorMsg
        {
            background-color: Red;
            border: 1px solid #ccc;
            color: #FFF;
            padding: 3px;
            text-align: center;
        }
        #mainPanel
        {
        	-moz-border-radius: 5px;
            background-color: #E4F2FD;
            border: 10px solid #CCCCCC;
            margin: 50px auto;
            padding: 20px;
            width: 400px;
        }
        #mainPanel h1
        {
            font-size: 16px;
            margin: 0px 0px 20px;
        }
        #instruction, .declare
        {
            color: #A0A0A0;
        }
        #mainPanel label
        {
            display: block;
            font-size: 12px;
            font-weight: bold;
            margin: 0px 0px 2px;
        }
        #mainPanel input
        {
            display: block;
            color: #555555;
            font-size: 14px;
            padding: 3px;
            margin-bottom: 10px;
            width: 275px;
        }
        #mainPanel input.button
        {
            color: #000000;
            font-size: 14px;
            width: auto;
        }
        #mainPanel div.extra
        {
            border-top: 1px dashed #999999;
            margin-top: 20px;
            padding-top: 10px;
        }
        #mainPanel div.extra ul
        {
            margin: 0px 0px 0px 15px;
            padding: 0px;
        }
        #mainPanel div.extra li
        {
            list-style-type: square;
            padding: 3px 0px;
        }
    </style>
    <title><%= Html.Encode(ViewData[BaseController.TITLE]) %></title>
</head>
<body>
    <div id="container">
    
		<form method="post" action="/Register">
		
		<%if(ViewData.ContainsKey(UserController.KEY_ERROR_MSG)) { %>
		    <p id="errorMsg"><%=ViewData[UserController.KEY_ERROR_MSG] %></p>
	    <%} %>
	    
        <div id="mainPanel">
            <% if (ViewData.Model.IsCurrentUserUpdate) { %>
            <div style="border:1px solid red; padding: 20px;">
                Create new user successfully! Click here to <%=Html.ActionLink<UserController>(x => x.Login(), "login") %>
            </div>
            <% } %>
    
			<h1>Register New User</h1>
			<p id="instruction">Fill in the form to register new user. You can always update more details after registration is done.</p>
			<label for="tx_userName">Username</label>
            <%=Html.TextBox("userName", new { id = "tx_userName", title = "User Name", size = "25"})%>
			<label for="tx_password">Password</label>
            <%--<%=Html.TextBox("password", new { id = "tx_password", title = "Password", size="25", maxlegnth="30"})%>--%>
            <%=Html.Password("password", new { id = "tx_password", title = "Password", size = "25", maxlegnth = "30" })%>
            <label for="tx_password">Confirm Password</label>
            <%=Html.Password("confirmPassword", new { id = "tx_confirmPassword", title = "Confirm Password", size = "25", maxlegnth = "30" })%>
            <label for="tx_email">E-Mail</label>
            <%=Html.TextBox("email", new { id = "tx_email", title = "E-Mail", size = "25", maxlength="100"})%>
            
            <div class="extra">
                <p class="declare">Tell us more about your self. This information will not be distributed without your permission</p>
                <label for="tx_firstName">First Name</label>
                <%=Html.TextBox("firstName", new { id = "tx_firstName", title = "First Name", size = "25", maxlegnth="50" })%>
                <label for="tx_lastName">Last Name</label>
               <%=Html.TextBox("lastName", new { id = "tx_lastName", title = "Last Name", size = "25", maxlegnth = "50" })%>
            </div>
            
            <input id="bt_create" type="submit" class="button" value="Register Now!" />
            
        </div>
		</form>
		
    </div>
</body>
</html>
